/**
 * Created by ZFL on 2017/11/11.
 */
    var vm=new Vue({
    el:'#storeInfo',
    data:{
        categoryParent:'',   // 二级分类
        category:'',   //三级分类
        storeName:'',   //店铺名称
        tel:'',       //店铺电话
        storeLogo:'',   //店铺logo图
        refuseReason:'',   //拒绝理由
        province:'',   //省
        city:'',      //市
        area:'',   //区
        address:'',   //详细地址
        saleBeginTime:'',   //营业开始时间
        saleEndTime:'',   //营业结束时间
        status:''      //店铺的状态

    }
})
var storeId= $.getPara('storeId');
vm.status= $.getPara('status');
function appInit(){
    PageInit();
}
function PageInit(){
    getStoreInfo();

}
function getStoreInfo(){
    $.ajaxHandler({
        model:function(){
            var obj={};
            obj.storeId=storeId;
            return obj;
        },
        visibleTime: 0,
        dataType: "json",
        approve:true,
        api: 'yg_baijiaappgoods/store/storeApprovalInfo',
        success:function(res){
            if(res.code=10000){
                var data=res.data;
                vm.categoryParent=data.categoryParent;   // 二级分类
                vm.category=data.category;   //三级分类
                vm.storeName=data.storeName;   //店铺名称
                vm.tel=data.tel;       //店铺电话
                vm.storeLogo=data.storeLogo;   //店铺logo图
                vm.refuseReason=data.refuseReason;   //拒绝理由
                vm.province=data.province;   //省
                vm.city=data.city;      //市
                vm.area=data.area;     //区
                vm.address=data.address;   //详细地址
                vm.saleBeginTime=data.saleBeginTime;   //营业开始时间
                vm.saleEndTime=data.saleEndTime;     //营业结束时间
            }
        }
    })
}


//点击重新编辑跳转重新编辑页面
$('.editBtn').click(function(){
//提交成功后   删除本地存储信息
    $.delStorage('idCardInfo');
    $.delStorage('licenceInfo');
    $.delStorage('navigateImage');
    $.delStorage('logoPath');
    $.delStorage('serviceImage');
    $.delStorage('storeInfo');
    window.location.href='./storeRecruit.html?storeId='+storeId+'&userId='+ $.getPara('userId')+'&status='+vm.status;
})